package com.atguigu.gmall.feign.ware;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author lfy
 * @Description
 * @create 2023-08-02 9:00
 *
 * value = "ware-manage-php"：仅作为client的名字，不作为注册中心查ip的依据
 * url = "http://localhost:9001": 直连模式，不用去注册中心查找这个微服务的ip地址
 */
@FeignClient(value = "ware-manage-php",url = "http://localhost:9001")
public interface WareFeignClient {

    // GET http://localhost:9001/hasStock?skuId=43&num=9998
    @GetMapping("/hasStock") //0: 没这么  1：有这么
    String  hasStock(@RequestParam("skuId") Long skuId, @RequestParam("num") Integer num);

}
